#include <stdio.h>
main()
{
    int nl, nm, i, j, flag, count=0;
    do 
    {
        printf("Inout START and END=?");
        scanf ("%d%d", &nl, &nm);
    }
    while (! (nl>0 && nl<nm));
    printf("...............PRIME TABLE(%d - %d)..................\n",nl,nm);
    if (nl==1||nl==2)
    {
        printf("%4d",2);
        nl =3; count++;
    }
    for (i=nl; i<=nm; i++)
    {
        if(! (i%2)) continue;
        for (flag=1,j=3; flag&&j<i/2; j+=2)
          if(! (i%j)) flag =0;
        if (flag) 
        printf (++count%15 ? "%4d " : "%4d\n", i );
    }
}